﻿using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 畜牧业审核程序国产.Models.DataGridMsgs
{
    public partial class FormulaMsgs : ObservableObject
    {
        [ObservableProperty]
        private string? _tableRelation;
        [ObservableProperty]
        private string? _severity;
        [ObservableProperty]
        private string? _formulaEnable;
        [ObservableProperty]
        private string? _formulaName;
        [ObservableProperty]
        private string? _formulaDescription;
        //[ObservableProperty]
        //private string _isEnable;
        [ObservableProperty]
        private string _sqlStatement;
        [ObservableProperty]
        private string? _keyIndicatorName1;
        [ObservableProperty]
        private string? _keyIndicatorValue1;
        [ObservableProperty]
        private string? _keyIndicatorName2;
        [ObservableProperty]
        private string? _keyIndicatorValue2;
        [ObservableProperty]
        private string? _sqlPreparedStatement;
        [ObservableProperty]
        private string? _formulaPreparedDescription;
        public FormulaMsgs(string 表间关系, string 严重度, string 是否启用, string 审核公式名称, string 审核公式说明, string 审核公式sql语句, string sql预备语句, string 关键指标名称1, string 关键指标值1, string 关键指标名称2, string 关键指标值2, string 审核公式说明预备语句)
        {
            this.TableRelation = 表间关系;
            this.Severity = 严重度;
            this.FormulaEnable = 是否启用;
            this.FormulaName = 审核公式名称;
            this.FormulaDescription = 审核公式说明;
            this.SqlStatement = 审核公式sql语句;
            this.SqlPreparedStatement = sql预备语句;
            this.KeyIndicatorName1 = 关键指标名称1;
            this.KeyIndicatorValue1 = 关键指标值1;
            this.KeyIndicatorName2 = 关键指标名称2;
            this.KeyIndicatorValue2 = 关键指标值2;
            this.FormulaPreparedDescription = 审核公式说明预备语句;
        }
        //public FormulaMsgs()
        //{

        //}
        //public FormulaMsgs( string 新增 )
        //{
        //    this.KeyIndicatorName1 = 新增;
        //}
        //事实证明如果字段没有通知属性的话,就算用户修改了datagrid中的数据,也无法返回到viewmodel的值中
        //public string 表间关系 { get; set; }
        //public string 严重度 { get; set; }
        //public string 审核公式名称 { get; set; }
        //public string 审核公式说明 { get; set; }
        //public string sql语句 { get; set; }
        //public string? 关键指标名称1 { get; set; }
        //public string? 关键指标值1 { get; set; }
        //public string? 关键指标名称2 { get; set; }
        //public string? 关键指标值2 { get; set; }
        //public FormulaMsgs(string 横向纵向, string 严重程度, string 公式名称, string 公式说明, string 指标名1, string 指标值1, string 指标名2, string 指标值2)
        //{
        //    this.表间关系 = 横向纵向;
        //    this.严重度 = 严重程度;
        //    this.审核公式名称 = 公式名称;
        //    this.审核公式说明 = 公式说明;
        //    this.关键指标名称1 = 指标名1;
        //    this.关键指标值1 = 指标值1;
        //    this.关键指标名称2 = 指标名2;
        //    this.关键指标值2 = 指标值2;

        //}
    }
}
